[Architecture] Roles for white-label service access.
Posted
by saurabhj
on Stack Overflow
See other posts from Stack Overflow
or by saurabhj
Published on 2009-03-31T14:05:14Z
Indexed on
2010/03/25
15:03 UTC
Read the original article
Hit count: 510
Okay,
I know I'm doing something wrong - but can't figure out a better way. I am developing a website which is going to allow users to setup their own mini-websites.
Something like Ning. Also, I have only 1 basic login and access to each mini website is provided (right now) via roles.
So the way I am doing this right now is:
Everytime a new mini website is created - say blah, I create 2 roles in my application. blah_users and blah_admin
The user creating the mini website is given the role - blah_admin and every other user wanting to join this mini website (or network) is given the role - blah_user.
Anyone can view data from any website. However to add data, one must be a member of that mini site (must have the blah_user role assigned)
The problem that I am facing is that by doing a role based system, I'm having to do loads of stuff manually. Asp.Net 2 controls which work on the User.IsAunthenticated property are basically useless to me now because along with the IsAuthenticated property, I must also check if the user has the proper role.
I'm guessing there is a better way to architect the system but I am not sure how. Any ideas?
This website is being developed in ASP.Net 2 on IIS 6. Thanks a tonne!
© Stack Overflow or respective owner